﻿Imports System.Windows.Data

Namespace Views

    ''' <summary>
    ''' 
    ''' </summary>
    ''' <remarks></remarks>
    Public Class ViewDataImport
    End Class

    Namespace Converters
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public Class NomTableConverter
            Implements IValueConverter

            ''' <summary>
            ''' 
            ''' </summary>
            ''' <remarks></remarks>
            Public Function Convert(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.Convert
                If Not value Is Nothing Then
                    Dim nomTableSAS As String = DirectCast(value, String)
                    Return Right(nomTableSAS, nomTableSAS.Length - InStr(nomTableSAS, "."))
                Else
                    Return Nothing
                End If
            End Function

            ''' <summary>
            ''' 
            ''' </summary>
            ''' <remarks></remarks>
            Public Function ConvertBack(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.ConvertBack
                Return "libenc." & value
            End Function
        End Class
    End Namespace

End Namespace